from time import sleep

from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By

wd=webdriver.Chrome()
wd.maximize_window()
wd.get("https://www.baidu.com")
# ele=wd.find_element(By.LINK_TEXT,"更多")
#鼠标悬停
# ActionChains(wd).move_to_element(ele).perform()
#冻结  F12  Console   setTimeout(function(){debugger},5000)

xt=wd.find_element(By.XPATH,"//*[@id='kw']").send_keys("111")
ActionChains(wd).move_to_element(xt).perform()
ActionChains(wd).move_to_element(xt).perform()


win=wd.window_handles
wd.switch_to.window(win[-1])